Python Mysql Query Execution